<#import "themes/${theme}/macro/frontCurrentPosition.ftl" as frontCurrentPosition />
<#import "themes/${theme}/macro/frontPage.ftl" as frontPage />
<#import "themes/${theme}/macro/frontContentType.ftl" as frontContentType />
<!DOCTYPE html>
<html>
    <head>
        <title>${getSite(siteId).name}-${curColumn.name}</title>

		<meta name="description" content="${curColumn.description}" />
		<meta name="keywords" content="${curColumn.keywords}" />
		<style>
			.slide {
				position: relative !important;
				top: 0px !important;
				transform: none !important;
			}
		</style>
		<script type="text/javascript">
			jQuery(document).ready(function() {
				${"$"}(".problem-text").on("click","h3",function(){
					var hideFlag = ${"$"}(this).parent().find("p").is(":hidden");
					if(!hideFlag){
						if(${"$"}.trim(${"$"}(this).parent().find("p").html())==""){
							${"$"}(this).parent().find("p").html("<br/>");
						}
						${"$"}(this).parent().find("p").slideUp(200);
						${"$"}(this).find(".problem-text-icon i").removeClass("fa-angle-double-down");
						${"$"}(this).find(".problem-text-icon i").addClass("fa-angle-double-up");
					}else{
						${"$"}(this).parent().find("p").slideDown(400);
						${"$"}(this).find(".problem-text-icon i").removeClass("fa-angle-double-up");
						${"$"}(this).find(".problem-text-icon i").addClass("fa-angle-double-down");
					}
				});
			});
		</script>
    </head>
    <body>
		<!-- 导航 -->
        <@frontCurrentPosition.content curColumn />

        <!-- 列表 -->
        <div class="common-container">
	        <div class="container">
	        	<div class="row">
		        	<div class="col-sm-2">
		        		<@frontContentType.content curColumn "common"/>
		        	</div>
		        	<div class="col-sm-1"></div>
	        		<div class="col-sm-9" >
			            <div class="row" >
			            	<div class="common-masonry">
			            		<#list  page.list as contents>
			            			<div class="common-box slide contentType-${contents.contentTypeId}">
			            				<div class="col-sm-12 problem-text wow fadeInLeft">
						                    <h3><i class="${contents.image}"></i>
						                    	<span class="badge problem-text-badge">
						                    		${(page.pageNo-1)*page.pageSize+1+contents_index}
						                    	</span>
						                    	${(contents.topWeight gt 0) ? then('<span class="top-outline">置顶</span>','')}
						                    	${contents.title}
						                    	<span class="problem-text-icon"><i class="fa fa-angle-double-down"></i></span>
						                    </h3>
						                    <p>${contents.description}</p>
						                </div>
					                </div>
								</#list>
			                </div>
			            </div>
			            <!-- 分页 -->
			            <div class="row" >
							<@frontPage.content page "${ctxFrt}/${siteId}/col${preview}-${curColumn.id}${urlSuffix}" />
						</div>
	        		</div>
	        	</div>
	        </div>
        </div>

    </body>
</html>
